Skip to content

docs(skills): a master_detail child is a record-page body table by default - #35751

Closed
objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/issue-35692-master-detail-body-table
Closed

objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/issue-35692-master-detail-body-table

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #35692

Clause-②: no
Metadata-protocol: none
Skills-docs: updated here

维护者速读

  • 用户能看到什么变化:照着技能文档写应用的开发者和 AI,会读到新规则:主从子表默认就是记录页概览里的整宽表格,不用再多写一个声明。
  • 为什么做:记录页的规则已经上线,技能文档和评测样例还写着旧规则,照着写会多写一个不需要的声明。
  • 出错会怎样:只改了文档和评测样例,不影响运行;写错时 AI 可能给出多余或错误的声明,撤回这一个合并即可恢复。
  • 要你做什么:无。

What changes

Text only, four files under skills/ and one changeset. Each changed sentence was checked against origin/main at 03bce5c22.

Skill sentence (after) Source on main
A master_detail child with no relatedList is a body table packages/spec/src/data/related-list-body-table.ts:62-67; verdict table rows related-list-body-table.test.ts:36-40; packages/spec/src/data/field.zod.ts:2129-2134
A lookup child with no relatedList is a panel related-list-body-table.test.ts:31,35; field.zod.ts:2134
'primary' is the body table on either type related-list-body-table.ts:64; related-list-body-table.test.ts:34,41
true is a panel, also on a master_detail related-list-body-table.ts:65; related-list-body-table.test.ts:42,44
false hides the list related-list-body-table.test.ts:43,45; field.zod.ts:2113
inlineEdit governs entry in the parent's form only field.zod.ts:2085; related-list-body-table.ts:16-18; test rows 37-40 and 44-45 (the verdict does not move with inlineEdit)
Body tables are drawn above the field sections ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts:816-821; ui/packages/plugin-detail/src/synth/__tests__/buildDefaultPageSchema.bodyTables-27055.test.ts:55-66,84-87
The parent's relatedLists orders the tables ui/packages/app-shell/src/utils/deriveRelatedLists.ts:428; field.zod.ts:2120-2123

Files:

  • skills/objectstack-data/rules/relationships.md, "Detail-page related lists". The lead sentence states both defaults and that inlineEdit plays no part. The example no longer writes inlineEdit: true and relatedList: 'primary' on a master_detail field. The list reads 'primary' (default for a master_detail FK), false, true (default for a lookup FK). The old line 368 said "Default for a master_detail FK with inlineEdit".
  • skills/objectstack-ui/rules/record-page.md, step 2. This is the second place under skills/ that tied the body table to inlineEdit ("the default for a master_detail with inlineEdit"). The same sentence said the table is drawn "after the first field section"; the merged change draws it above the field sections, so that clause is corrected too. "Put the tasks first" is now the parent's relatedLists, and the example field drops relatedList: 'primary'.
  • skills/objectstack-ui/evals/record-page.json, case 1. The prompt is unchanged (task.lead is a master_detail). The expected answer adds no placement flag. must_contain is relatedListFilter and relatedLists; must_not_contain gains inlineEdit: (the authored key, so prose that only names it still passes).
  • skills/objectstack-ui/evals/README.md: the one-line description of that case.

Search for other sentences tying the body table to inlineEdit: git grep -n -i inlineEdit -- skills gives 20 hits in 10 files; git grep -n -E "relatedList\b|body table|'primary'|related list" -- skills was read too. Only the two rules files above carried the old rule. The other inlineEdit hits are form-side and stay: relationships.md 251-314, field-types.md:123, lint-rules.md:15-18, objectstack-ui/SKILL.md:55, list-views.md:370-371, react-blocks.md:76 (a list-view prop), the data eval case 2 and the wizard eval.

Budget

Counting is the gate's: ceil(utf8 bytes / 4). No ceiling row moves and scripts/check-skills-token-ratchet.mjs is not edited.

lines before lines after bytes before bytes after tokens before tokens after ceiling
objectstack-data/rules/relationships.md 411 408 16811 16790 4203 4198 4203
objectstack-ui/rules/record-page.md 65 65 3961 3939 991 985 991
objectstack-ui/evals/record-page.json (not ratcheted) 56 57 3237 3288 810 822 none
objectstack-ui/evals/README.md (not ratcheted) 51 51 2373 2369 594 593 none
ratcheted (authored) subtotal 196132 196121 201053
eval fixtures subtotal 70045 70056 none
bundle total (whole shipped tree) 22535 22533 280730 280730

All SKILL.md files together: 4861 lines before and after (none is touched).

Tests

No package source changes, so there is no build closure owed and no unit test moves. The local readings are gates, run on head 1ea279acf.

Acceptance notes

  • relationships.md lost one true clause to pay for the new text: "owned (master_detail) children first" (the derived order when the parent declares no relatedLists, deriveRelatedLists.ts:424-428). The Order bullet under it still teaches the authored order.
  • relationships.md 277-281 ("Leave it off for associations ...") is unchanged. Those master_detail children are body tables by default now; the true and false bullets are how an author moves or hides one. No extra sentence was added for it.
  • record-page.md step 1 still says the tab row is "Overview, Activity, one tab per panel". The synthesizer test in buildDefaultPageSchema.bodyTables-27055.test.ts:94-97 says no per-list tab is emitted any more. Read only, not measured in a running console, and outside this card.
  • An explicit relatedList: 'primary' on a master_detail field stays valid. The eval does not forbid it.

Verification

Read first, by risk:

  1. skills/objectstack-ui/evals/record-page.json case 1: the must and must-not lists decide what a graded answer may contain.
  2. skills/objectstack-data/rules/relationships.md 347-368: the rule as taught.
  3. skills/objectstack-ui/rules/record-page.md 17-27.

Two-minute check: node scripts/check-skills-token-ratchet.mjs prints relationships.md is 4198 tokens (ceiling 4203; headroom 5) and bundle total (whole shipped tree) 280730, and exits 0.

Local gate readings on 1ea279a

node scripts/pm/dispatch-gates.mjs --ran: 48 derived famil(ies) accounted for — 44 run, 4 NOT-MEASURED (4 DERIVED from a recorded exit 3).

Exit 0: check-skills-token-ratchet and its --self-test (104 cases), check:skill-served-sections, check:skill-links, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-formula-expressions (after building @objectstack/formula and @objectstack/lint), check:doc-authoring, check:nul-bytes, check:pm-skill-id-lint, check:published-files, the changeset gates, and the rest of the derived list.

Outside the derived list, exit 0: check:skill-docs, check:skill-refs, check:changeset-fixed, and check:skill-examples after building @objectstack/client-react and @objectstack/client (346 prose examples type-check across 3 surface(s)); the edited os:check block in record-page.md is one of them.

NOT MEASURED locally (exit 3, each needs a full workspace build, and the diff touches no package): check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. CI runs them.

node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 before each push.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL

…fault

The data and ui skills tied the record-page body table to inlineEdit. They
now teach the rule isBodyTableRelationship applies: a master_detail FK with
no relatedList is a body table, a lookup FK with none is a panel, and
inlineEdit governs entry in the parent's form only.

Claude-Session: https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL

Superseded by #35757, which folds this pull with the three other area b1-D skills-text pulls (#35743, #35746, #35750, #35751) onto current main at the seat request: one approval and one merge on the governed skills/** surface instead of four rounds on the shared token-ratchet budget. The commits of this branch are carried into #35757 unchanged by merge. Closing this one; the branch is left in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants